Page({

  onLoad() {
    this.getrepairlist()
  },
  async getrepairlist() {
    const res = await wx.http.get('repair')
    if (res.code !== 10000) return wx.utils.toast(res.message)
    console.log(res);
    this.setData({
      repairlist: res.data.rows
    })
  },

  goDetail(e) {
    //  点击报修列表获取报修id跳转报修详情页面
    wx.navigateTo({
      url: `/repair_pkg/pages/detail/index?id=${e.mark.id}`,
    })
  },
  addRepair() {
    wx.navigateTo({
      url: '/repair_pkg/pages/form/index',
    })
  },
})
